package HLLibClasses;

import HLCode.HLClassManager;
import HLCode.HLLibClass;
import HLCode.HLObject;
import HLLib.base.HLByteList;
import HLLib.base.HLCharList;
import HLLib.base.HLDictionary;
import HLLib.base.HLString;

public class HLClassString extends HLLibClass {
    public HLClassString(HLClassManager owner) {
        super(owner);
    }

    public HLObject NewObject() {
        return new HLString();
    }

    public void Execute(HLObject self, int index, HLObject args, HLObject resultOwnerObject, int resultIndex) {
        switch (index) {
        case 0: {
            if (resultOwnerObject == null) {
                ((HLString) self).CharAt(args.GetInt(0));
            } else {
                resultOwnerObject.SetInt(resultIndex, ((HLString) self).CharAt(args.GetInt(0)));
            }
            break;
        }
        case 1: {
            if (resultOwnerObject == null) {
                ((HLString) self).CompareTo((HLString)args.GetObject(0));
            } else {
                resultOwnerObject.SetInt(resultIndex, ((HLString) self).CompareTo((HLString)args.GetObject(0)));
            }
            break;
        }
        case 2: {
            if (resultOwnerObject == null) {
                ((HLString) self).Concat((HLString)args.GetObject(0));
            } else {
                resultOwnerObject.SetObject(resultIndex, ((HLString) self).Concat((HLString)args.GetObject(0)));
            }
            break;
        }
        case 3: {
            if (resultOwnerObject == null) {
                ((HLString) self).ConcatInt(args.GetInt(0));
            } else {
                resultOwnerObject.SetObject(resultIndex, ((HLString) self).ConcatInt(args.GetInt(0)));
            }
            break;
        }
        case 4: {
            if (resultOwnerObject == null) {
                ((HLString) self).EndsWith((HLString)args.GetObject(0));
            } else {
                resultOwnerObject.SetBoolean(resultIndex, ((HLString) self).EndsWith((HLString)args.GetObject(0)));
            }
            break;
        }
        case 5: {
            if (resultOwnerObject == null) {
                ((HLString) self).Equals((HLString)args.GetObject(0));
            } else {
                resultOwnerObject.SetBoolean(resultIndex, ((HLString) self).Equals((HLString)args.GetObject(0)));
            }
            break;
        }
        case 6: {
            if (resultOwnerObject == null) {
                ((HLString) self).GetBytes();
            } else {
                resultOwnerObject.SetObject(resultIndex, ((HLString) self).GetBytes());
            }
            break;
        }
        case 7: {
            if (resultOwnerObject == null) {
                ((HLString) self).HashCode();
            } else {
                resultOwnerObject.SetInt(resultIndex, ((HLString) self).HashCode());
            }
            break;
        }
        case 8: {
            if (resultOwnerObject == null) {
                ((HLString) self).IndexOfChar(args.GetInt(0));
            } else {
                resultOwnerObject.SetInt(resultIndex, ((HLString) self).IndexOfChar(args.GetInt(0)));
            }
            break;
        }
        case 9: {
            if (resultOwnerObject == null) {
                ((HLString) self).IndexOfCharEX(args.GetInt(0), args.GetInt(1));
            } else {
                resultOwnerObject.SetInt(resultIndex, ((HLString) self).IndexOfCharEX(args.GetInt(0), args.GetInt(1)));
            }
            break;
        }
        case 10: {
            if (resultOwnerObject == null) {
                ((HLString) self).IndexOfString((HLString)args.GetObject(0));
            } else {
                resultOwnerObject.SetInt(resultIndex, ((HLString) self).IndexOfString((HLString)args.GetObject(0)));
            }
            break;
        }
        case 11: {
            if (resultOwnerObject == null) {
                ((HLString) self).IndexOfStringEX((HLString)args.GetObject(0), args.GetInt(0));
            } else {
                resultOwnerObject.SetInt(resultIndex, ((HLString) self).IndexOfStringEX((HLString)args.GetObject(0), args.GetInt(0)));
            }
            break;
        }
        case 12: {
            if (resultOwnerObject == null) {
                ((HLString) self).LastIndexOfChar(args.GetInt(0));
            } else {
                resultOwnerObject.SetInt(resultIndex, ((HLString) self).LastIndexOfChar(args.GetInt(0)));
            }
            break;
        }
        case 13: {
            if (resultOwnerObject == null) {
                ((HLString) self).LastIndexOfCharEX(args.GetInt(0), args.GetInt(1));
            } else {
                resultOwnerObject.SetInt(resultIndex, ((HLString) self).LastIndexOfCharEX(args.GetInt(0), args.GetInt(1)));
            }
            break;
        }
        case 14: {
            if (resultOwnerObject == null) {
                ((HLString) self).Length();
            } else {
                resultOwnerObject.SetInt(resultIndex, ((HLString) self).Length());
            }
            break;
        }
        case 15: {
            if (resultOwnerObject == null) {
                ((HLString) self).Replace((char)args.GetInt(0), (char)args.GetInt(1));
            } else {
                resultOwnerObject.SetObject(resultIndex, ((HLString) self).Replace((char)args.GetInt(0), (char)args.GetInt(1)));
            }
            break;
        }
        case 16: {
            if (resultOwnerObject == null) {
                ((HLString) self).ReplaceString((HLString)args.GetObject(0), (HLString)args.GetObject(1));
            } else {
                resultOwnerObject.SetObject(resultIndex, ((HLString) self).ReplaceString((HLString)args.GetObject(0), (HLString)args.GetObject(1)));
            }
            break;
        }
        case 17: {
            if (resultOwnerObject == null) {
                ((HLString) self).Split((char)args.GetInt(0));
            } else {
                resultOwnerObject.SetObject(resultIndex, ((HLString) self).Split((char)args.GetInt(0)));
            }
            break;
        }
        case 18: {
            if (resultOwnerObject == null) {
                ((HLString) self).StartsWith((HLString)args.GetObject(0));
            } else {
                resultOwnerObject.SetBoolean(resultIndex, ((HLString) self).StartsWith((HLString)args.GetObject(0)));
            }
            break;
        }
        case 19: {
            if (resultOwnerObject == null) {
                ((HLString) self).Substring(args.GetInt(0));
            } else {
                resultOwnerObject.SetObject(resultIndex, ((HLString) self).Substring(args.GetInt(0)));
            }
            break;
        }
        case 20: {
            if (resultOwnerObject == null) {
                ((HLString) self).SubstringEX(args.GetInt(0), args.GetInt(1));
            } else {
                resultOwnerObject.SetObject(resultIndex, ((HLString) self).SubstringEX(args.GetInt(0), args.GetInt(1)));
            }
            break;
        }
        case 21: {
            if (resultOwnerObject == null) {
                ((HLString) self).PadLeft(args.GetInt(0), (char)args.GetInt(1));
            } else {
                resultOwnerObject.SetObject(resultIndex, ((HLString) self).PadLeft(args.GetInt(0), (char)args.GetInt(1)));
            }
            break;
        }
        case 22: {
            if (resultOwnerObject == null) {
                ((HLString) self).PadRight(args.GetInt(0), (char)args.GetInt(1));
            } else {
                resultOwnerObject.SetObject(resultIndex, ((HLString) self).PadRight(args.GetInt(0), (char)args.GetInt(1)));
            }
            break;
        }
        case 23: {
            if (resultOwnerObject == null) {
                ((HLString) self).ToCharArray();
            } else {
                resultOwnerObject.SetObject(resultIndex, ((HLString) self).ToCharArray());
            }
            break;
        }
        case 24: {
            if (resultOwnerObject == null) {
                ((HLString) self).ToLowerCase();
            } else {
                resultOwnerObject.SetObject(resultIndex, ((HLString) self).ToLowerCase());
            }
            break;
        }
        case 25: {
            if (resultOwnerObject == null) {
                ((HLString) self).ToUpperCase();
            } else {
                resultOwnerObject.SetObject(resultIndex, ((HLString) self).ToUpperCase());
            }
            break;
        }
        case 26: {
            if (resultOwnerObject == null) {
                ((HLString) self).Trim();
            } else {
                resultOwnerObject.SetObject(resultIndex, ((HLString) self).Trim());
            }
            break;
        }
        case 27: {
            if (resultOwnerObject == null) {
                ((HLString) self).ToInt();
            } else {
                resultOwnerObject.SetInt(resultIndex, ((HLString) self).ToInt());
            }
            break;
        }
        case 28: {
            if (resultOwnerObject == null) {
                ((HLString) self).ToIntWithBase(args.GetInt(0));
            } else {
                resultOwnerObject.SetInt(resultIndex, ((HLString) self).ToIntWithBase(args.GetInt(0)));
            }
            break;
        }
        case 29: {
            if (resultOwnerObject == null) {
                ((HLString) self).ToBoolean();
            } else {
                resultOwnerObject.SetBoolean(resultIndex, ((HLString) self).ToBoolean());
            }
            break;
        }
        }
    }

    public void StaticExecute(int index, HLObject args, HLObject resultOwnerObject, int resultIndex) {
        switch (index) {
        case 0: {
            if (resultOwnerObject == null) {
                HLString.GetBytes((HLString)args.GetObject(0));
            } else {
                resultOwnerObject.SetObject(resultIndex, HLString.GetBytes((HLString)args.GetObject(0)));
            }
            break;
        }
        case 1: {
            if (resultOwnerObject == null) {
                HLString.ValueOfBoolean(args.GetBoolean(0));
            } else {
                resultOwnerObject.SetObject(resultIndex, HLString.ValueOfBoolean(args.GetBoolean(0)));
            }
            break;
        }
        case 2: {
            if (resultOwnerObject == null) {
                HLString.ValueOfByteList((HLByteList)args.GetObject(0));
            } else {
                resultOwnerObject.SetObject(resultIndex, HLString.ValueOfByteList((HLByteList)args.GetObject(0)));
            }
            break;
        }
        case 3: {
            if (resultOwnerObject == null) {
                HLString.ValueOfChar((char)args.GetInt(0));
            } else {
                resultOwnerObject.SetObject(resultIndex, HLString.ValueOfChar((char)args.GetInt(0)));
            }
            break;
        }
        case 4: {
            if (resultOwnerObject == null) {
                HLString.ValueOfCharList((HLCharList)args.GetObject(0));
            } else {
                resultOwnerObject.SetObject(resultIndex, HLString.ValueOfCharList((HLCharList)args.GetObject(0)));
            }
            break;
        }
        case 5: {
            if (resultOwnerObject == null) {
                HLString.ValueOfSubCharList((HLCharList)args.GetObject(0), args.GetInt(0), args.GetInt(1));
            } else {
                resultOwnerObject.SetObject(resultIndex, HLString.ValueOfSubCharList((HLCharList)args.GetObject(0), args.GetInt(0), args.GetInt(1)));
            }
            break;
        }
        case 6: {
            if (resultOwnerObject == null) {
                HLString.ValueOfInt(args.GetInt(0));
            } else {
                resultOwnerObject.SetObject(resultIndex, HLString.ValueOfInt(args.GetInt(0)));
            }
            break;
        }
        case 7: {
            if (resultOwnerObject == null) {
                HLString.ValueOfTime(args.GetInt(0), args.GetInt(1), args.GetInt(2), args.GetInt(3));
            } else {
                resultOwnerObject.SetObject(resultIndex, HLString.ValueOfTime(args.GetInt(0), args.GetInt(1), args.GetInt(2), args.GetInt(3)));
            }
            break;
        }
        case 8: {
            if (resultOwnerObject == null) {
                HLString.IsNum((char)args.GetInt(0));
            } else {
                resultOwnerObject.SetBoolean(resultIndex, HLString.IsNum((char)args.GetInt(0)));
            }
            break;
        }
        case 9: {
            if (resultOwnerObject == null) {
                HLString.IsChar((char)args.GetInt(0));
            } else {
                resultOwnerObject.SetBoolean(resultIndex, HLString.IsChar((char)args.GetInt(0)));
            }
            break;
        }
        case 10: {
            if (resultOwnerObject == null) {
                HLString.GetLanguageTextByScript((HLDictionary)args.GetObject(0), (HLString)args.GetObject(1));
            } else {
                resultOwnerObject.SetObject(resultIndex, HLString.GetLanguageTextByScript((HLDictionary)args.GetObject(0), (HLString)args.GetObject(1)));
            }
            break;
        }
        case 11: {
            if (resultOwnerObject == null) {
                HLString.UrlEncode((HLString)args.GetObject(0));
            } else {
                resultOwnerObject.SetObject(resultIndex, HLString.UrlEncode((HLString)args.GetObject(0)));
            }
            break;
        }
        case 12: {
            if (resultOwnerObject == null) {
                HLString.UrlDecode((HLString)args.GetObject(0));
            } else {
                resultOwnerObject.SetObject(resultIndex, HLString.UrlDecode((HLString)args.GetObject(0)));
            }
            break;
        }
        }
    }
}
